var arr = [1,2,3,4,5,6];

// var r = arr.indexOf('4')

// var r = arr.indexOf(2,3)

var r = arr.lastIndexOf(4,1)

console.log(r);